
operation_point.o:     file format elf32-littlearm


Disassembly of section .text:

00000000 <main>:
#include <stdio.h>



int main(void)
{
   0:	e92d4800 	push	{fp, lr}
   4:	e28db004 	add	fp, sp, #4
   8:	e24dd020 	sub	sp, sp, #32
	int urn[5] = {100, 200, 300, 400, 500};
   c:	e59f31b0 	ldr	r3, [pc, #432]	; 1c4 <main+0x1c4>
  10:	e24bc01c 	sub	ip, fp, #28
  14:	e1a0e003 	mov	lr, r3
  18:	e8be000f 	ldm	lr!, {r0, r1, r2, r3}
  1c:	e8ac000f 	stmia	ip!, {r0, r1, r2, r3}
  20:	e59e3000 	ldr	r3, [lr]
  24:	e58c3000 	str	r3, [ip]
	int *ptr1, *ptr2, *ptr3;

	ptr1 = urn;
  28:	e24b301c 	sub	r3, fp, #28
  2c:	e50b3020 	str	r3, [fp, #-32]	; 0xffffffe0    ptr1
	ptr2 = &urn[2];
  30:	e24b301c 	sub	r3, fp, #28
  34:	e2833008 	add	r3, r3, #8
  38:	e50b3024 	str	r3, [fp, #-36]	; 0xffffffdc    ptr2

	printf("pointer value, dereferenced pointer, pointer address:\n");
  3c:	e59f0184 	ldr	r0, [pc, #388]	; 1c8 <main+0x1c8>
  40:	ebfffffe 	bl	0 <puts>
	printf("ptr1 = %p, *ptr1 = %d, &ptr1 = %p\n", ptr1, *ptr1, &ptr1);	// 100
  44:	e51b1020 	ldr	r1, [fp, #-32]	; 0xffffffe0
  48:	e51b3020 	ldr	r3, [fp, #-32]	; 0xffffffe0
  4c:	e5932000 	ldr	r2, [r3]        ; *ptr1
  50:	e24b3020 	sub	r3, fp, #32     ; &ptr1
  54:	e59f0170 	ldr	r0, [pc, #368]	; 1cc <main+0x1cc>
  58:	ebfffffe 	bl	0 <printf>

	// pointer addition   + 
	ptr3 = ptr1 + 4;
  5c:	e51b3020 	ldr	r3, [fp, #-32]	; 0xffffffe0
  60:	e2833010 	add	r3, r3, #16     ; ptr1+16
  64:	e50b3008 	str	r3, [fp, #-8]
		printf("\t==xiaozi ==== %d\n", *ptr3);	// 500
  68:	e51b3008 	ldr	r3, [fp, #-8]
  6c:	e5933000 	ldr	r3, [r3]
  70:	e1a01003 	mov	r1, r3
  74:	e59f0154 	ldr	r0, [pc, #340]	; 1d0 <main+0x1d0>
  78:	ebfffffe 	bl	0 <printf>
		
	printf("\n adding an int to a pointer:\n");
  7c:	e59f0150 	ldr	r0, [pc, #336]	; 1d4 <main+0x1d4>
  80:	ebfffffe 	bl	0 <puts>
	printf("ptr1 + 4 = %p, *(ptr4 + 3) = %d\n", 
  84:	e51b3020 	ldr	r3, [fp, #-32]	; 0xffffffe0
  88:	e2831010 	add	r1, r3, #16
				ptr1 + 4, *(ptr1 + 3));	// 400
  8c:	e51b3020 	ldr	r3, [fp, #-32]	; 0xffffffe0
  90:	e283300c 	add	r3, r3, #12
	// pointer addition   + 
	ptr3 = ptr1 + 4;
		printf("\t==xiaozi ==== %d\n", *ptr3);	// 500
		
	printf("\n adding an int to a pointer:\n");
	printf("ptr1 + 4 = %p, *(ptr4 + 3) = %d\n", 
  94:	e5933000 	ldr	r3, [r3]
  98:	e1a02003 	mov	r2, r3
  9c:	e59f0134 	ldr	r0, [pc, #308]	; 1d8 <main+0x1d8>
  a0:	ebfffffe 	bl	0 <printf>
				ptr1 + 4, *(ptr1 + 3));	// 400
				

	ptr1++;			// increase by degrees point    dizeng point
  a4:	e51b3020 	ldr	r3, [fp, #-32]	; 0xffffffe0
  a8:	e2833004 	add	r3, r3, #4
  ac:	e50b3020 	str	r3, [fp, #-32]	; 0xffffffe0
		printf("\t==xiaozi ==== %d\n", *ptr1);	// 200
  b0:	e51b3020 	ldr	r3, [fp, #-32]	; 0xffffffe0
  b4:	e5933000 	ldr	r3, [r3]
  b8:	e1a01003 	mov	r1, r3
  bc:	e59f010c 	ldr	r0, [pc, #268]	; 1d0 <main+0x1d0>
  c0:	ebfffffe 	bl	0 <printf>
		
	printf("\n values after ptr1++\n");
  c4:	e59f0110 	ldr	r0, [pc, #272]	; 1dc <main+0x1dc>
  c8:	ebfffffe 	bl	0 <puts>
	printf("ptr1 = %p, *ptr1 = %d, &ptr1 = %p\n", 
  cc:	e51b1020 	ldr	r1, [fp, #-32]	; 0xffffffe0
  d0:	e51b3020 	ldr	r3, [fp, #-32]	; 0xffffffe0
  d4:	e5932000 	ldr	r2, [r3]
  d8:	e24b3020 	sub	r3, fp, #32
  dc:	e59f00e8 	ldr	r0, [pc, #232]	; 1cc <main+0x1cc>
  e0:	ebfffffe 	bl	0 <printf>
				ptr1, *ptr1, &ptr1);	// 200

	ptr2--;			// descending		diqian point
  e4:	e51b3024 	ldr	r3, [fp, #-36]	; 0xffffffdc
  e8:	e2433004 	sub	r3, r3, #4
  ec:	e50b3024 	str	r3, [fp, #-36]	; 0xffffffdc
	printf("\n values after --ptr2\n");
  f0:	e59f00e8 	ldr	r0, [pc, #232]	; 1e0 <main+0x1e0>
  f4:	ebfffffe 	bl	0 <puts>
	printf("ptr2 = %p, *ptr2 = %d, &ptr2 = %p\n", 
  f8:	e51b1024 	ldr	r1, [fp, #-36]	; 0xffffffdc
  fc:	e51b3024 	ldr	r3, [fp, #-36]	; 0xffffffdc
 100:	e5932000 	ldr	r2, [r3]
 104:	e24b3024 	sub	r3, fp, #36	; 0x24
 108:	e59f00d4 	ldr	r0, [pc, #212]	; 1e4 <main+0x1e4>
 10c:	ebfffffe 	bl	0 <printf>
				ptr2, *ptr2, &ptr2);	// 200

	--ptr1;			// huifu wei chu shi zhi
 110:	e51b3020 	ldr	r3, [fp, #-32]	; 0xffffffe0
 114:	e2433004 	sub	r3, r3, #4
 118:	e50b3020 	str	r3, [fp, #-32]	; 0xffffffe0
	++ptr2;			// huifu wei chu shi zhi
 11c:	e51b3024 	ldr	r3, [fp, #-36]	; 0xffffffdc
 120:	e2833004 	add	r3, r3, #4
 124:	e50b3024 	str	r3, [fp, #-36]	; 0xffffffdc
		printf("\t==xiaozi ==== %d\n", *ptr1);	// 100
 128:	e51b3020 	ldr	r3, [fp, #-32]	; 0xffffffe0
 12c:	e5933000 	ldr	r3, [r3]
 130:	e1a01003 	mov	r1, r3
 134:	e59f0094 	ldr	r0, [pc, #148]	; 1d0 <main+0x1d0>
 138:	ebfffffe 	bl	0 <printf>
		printf("\t==xiaozi ==== %d\n", *ptr2);	// 300
 13c:	e51b3024 	ldr	r3, [fp, #-36]	; 0xffffffdc
 140:	e5933000 	ldr	r3, [r3]
 144:	e1a01003 	mov	r1, r3
 148:	e59f0080 	ldr	r0, [pc, #128]	; 1d0 <main+0x1d0>
 14c:	ebfffffe 	bl	0 <printf>
	printf("\n pointers reset to original values:\n");
 150:	e59f0090 	ldr	r0, [pc, #144]	; 1e8 <main+0x1e8>
 154:	ebfffffe 	bl	0 <puts>
	printf("ptr1 = %p, ptr2 = %p\n", 
 158:	e51b3020 	ldr	r3, [fp, #-32]	; 0xffffffe0
 15c:	e51b2024 	ldr	r2, [fp, #-36]	; 0xffffffdc
 160:	e1a01003 	mov	r1, r3
 164:	e59f0080 	ldr	r0, [pc, #128]	; 1ec <main+0x1ec>
 168:	ebfffffe 	bl	0 <printf>
					ptr1, ptr2);	// 300

	// yige point qianqu ling yige point
	printf("\n subtracting one pointer from another:\n");
 16c:	e59f007c 	ldr	r0, [pc, #124]	; 1f0 <main+0x1f0>
 170:	ebfffffe 	bl	0 <puts>
	printf("ptr2 = %p, ptr1 = %p, ptr2 - ptr1 = %d\n", 
 174:	e51b1024 	ldr	r1, [fp, #-36]	; 0xffffffdc
 178:	e51b2020 	ldr	r2, [fp, #-32]	; 0xffffffe0
						ptr2, ptr1, ptr2 - ptr1); // 2
 17c:	e51b3024 	ldr	r3, [fp, #-36]	; 0xffffffdc
 180:	e1a00003 	mov	r0, r3
 184:	e51b3020 	ldr	r3, [fp, #-32]	; 0xffffffe0
 188:	e0633000 	rsb	r3, r3, r0
	printf("ptr1 = %p, ptr2 = %p\n", 
					ptr1, ptr2);	// 300

	// yige point qianqu ling yige point
	printf("\n subtracting one pointer from another:\n");
	printf("ptr2 = %p, ptr1 = %p, ptr2 - ptr1 = %d\n", 
 18c:	e1a03143 	asr	r3, r3, #2
 190:	e59f005c 	ldr	r0, [pc, #92]	; 1f4 <main+0x1f4>
 194:	ebfffffe 	bl	0 <printf>
						ptr2, ptr1, ptr2 - ptr1); // 2


	// yige point qianqu yige zhengshu
	printf("\n subtracting an int from a pointer:\n");
 198:	e59f0058 	ldr	r0, [pc, #88]	; 1f8 <main+0x1f8>
 19c:	ebfffffe 	bl	0 <puts>
	printf("ptr3 = %p, ptr3 - 2 = %p\n", 
 1a0:	e51b3008 	ldr	r3, [fp, #-8]
 1a4:	e2433008 	sub	r3, r3, #8 ; ptr3 - 8
 1a8:	e1a02003 	mov	r2, r3
 1ac:	e51b1008 	ldr	r1, [fp, #-8]
 1b0:	e59f0044 	ldr	r0, [pc, #68]	; 1fc <main+0x1fc>
 1b4:	ebfffffe 	bl	0 <printf>
					ptr3, ptr3 - 2);

}
 1b8:	e1a00003 	mov	r0, r3
 1bc:	e24bd004 	sub	sp, fp, #4
 1c0:	e8bd8800 	pop	{fp, pc}
 1c4:	000001dc 	.word	0x000001dc
 1c8:	00000000 	.word	0x00000000
 1cc:	00000038 	.word	0x00000038
 1d0:	0000005c 	.word	0x0000005c
 1d4:	00000070 	.word	0x00000070
 1d8:	00000090 	.word	0x00000090
 1dc:	000000b4 	.word	0x000000b4
 1e0:	000000cc 	.word	0x000000cc
 1e4:	000000e4 	.word	0x000000e4
 1e8:	00000108 	.word	0x00000108
 1ec:	00000130 	.word	0x00000130
 1f0:	00000148 	.word	0x00000148
 1f4:	00000170 	.word	0x00000170
 1f8:	00000198 	.word	0x00000198
 1fc:	000001c0 	.word	0x000001c0
